<?php
  require("../global.php");
  
if($_REQUEST['formsub']=='submenu'){

} 

switch($_REQUEST['formsub']){
   case'customerbyid':
        customerbyid($_REQUEST['customer_id']);
   break;
}

        

    function customerbyid($customer_id){
		global $db;
		
		$sql = "select customer_id,customer,province,city,area,address,road,bank_name from dcustomermsg where customer_id = '".$customer_id."' limit 1";
		$cusinfo = $db->get_sql_row($sql,'mysql_fetch_assoc');
		
		if(is_array($cusinfo))
		{
		  $cusinfo['customer'] = mb_convert_encoding($cusinfo['customer'], "UTF-8", "GBK");
		  $cusinfo['province'] = mb_convert_encoding($cusinfo['province'], "UTF-8", "GBK");
		  $cusinfo['city'] = mb_convert_encoding($cusinfo['city'], "UTF-8", "GBK");
		  $cusinfo['area'] = mb_convert_encoding($cusinfo['area'], "UTF-8", "GBK");
		  $cusinfo['address'] = mb_convert_encoding($cusinfo['address'], "UTF-8", "GBK");
		  $cusinfo['road'] = mb_convert_encoding($cusinfo['road'], "UTF-8", "GBK");
		  $cusinfo['bank_name'] = mb_convert_encoding($cusinfo['bank_name'], "UTF-8", "GBK");
		  
		  echo $cusinfo['customer'].'#'.$cusinfo['province'].'#'.$cusinfo['city'].'#'.$cusinfo['area'].'#'.$cusinfo['address'].'#'.$cusinfo['road'].'#'.$cusinfo['bank_name'].'#'.$cusinfo['customer_id'];
		}else{
		  echo '1';
		}
		

		
	}
?>
